package com.common.account.entity;

import org.springframework.context.annotation.Configuration;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;

@Configuration
public class MyRedis {
    private Map<String, String> map = new HashMap<>();

    /**
     * 集
     *
     * @param key     关键
     * @param code    代码
     * @param i       我
     * @param seconds 秒
     */
    public void set(String key, String code, int i, TimeUnit seconds) {
        this.map.put(key, code);
    }

    /**
     * 得到
     *
     * @param key 关键
     * @return {@link String}
     */
    public String get(String key) {
        return this.map.get(key);
    }
}
